<template>
  <!-- 分页组件 -->
  <el-pagination
    :small="true"
    :background="true"
    :current-page="pageable.page"
    :page-size="pageable.limit"
    :page-sizes="[10, 15, 30, 50, 100]"
    :total="pageable.total"
    layout="total, sizes, prev, pager, next, jumper"
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
  ></el-pagination>
</template>

<script setup lang="ts" name="Pagination">
interface Pageable {
  page: number
  limit: number
  total: number
}

interface PaginationProps {
  pageable: Pageable
  handleSizeChange: (size: number) => void
  handleCurrentChange: (currentPage: number) => void
}

defineProps<PaginationProps>()
</script>
